package com.ethink.system.facade.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.system.api.info.SystemApiAuthorityInfo;
import com.ethink.system.api.request.SystemApiAuthorityAddRequest;
import com.ethink.system.api.request.SystemApiAuthorityQueryRequest;
import com.ethink.system.api.request.SystemApiAuthorityUpdateRequest;
import com.ethink.system.api.request.SystemMenuQueryRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ethink.system.service.SystemApiAuthorityService;
import com.ethink.system.api.SystemApiAuthorityFacade;

/**
 * 系统接口权限表 Facade接口
 *
 * @author default
 * @date 2022-09-26
 */
@RestController
@Slf4j
@RequestMapping("system-service/facade/v1/systemApiAuthority")
public class SystemApiAuthorityFacadeImpl implements SystemApiAuthorityFacade {

    @Autowired
    private SystemApiAuthorityService systemApiAuthorityService;


    @Override
    public Page<SystemApiAuthorityInfo> getSystemApiAuthorityList(SystemApiAuthorityQueryRequest request) {
        return systemApiAuthorityService.getSystemApiAuthorityList(request);
    }

    @Override
    public SystemApiAuthorityInfo getSystemApiAuthorityById(Long systemApiAuthorityId) {
        return systemApiAuthorityService.getSystemApiAuthorityById(systemApiAuthorityId);
    }

    @Override
    public void addSystemApiAuthority(SystemApiAuthorityAddRequest request) {
        systemApiAuthorityService.addSystemApiAuthority(request);
    }

    @Override
    public void updateSystemApiAuthority(SystemApiAuthorityUpdateRequest request) {
        systemApiAuthorityService.updateSystemApiAuthority(request);
    }

    @Override
    public void deleteSystemApiAuthority(Long systemApiAuthorityId) {
        systemApiAuthorityService.deleteSystemApiAuthority(systemApiAuthorityId);
    }
}